<div class="page-header settingheading">
  <h4>News Feed Settings</h4>
</div>
<?php echo form_open(null, 'id="form" class="form-horizontal"'); ?>
	<table class="table table-striped">
		<thead>
			<tr>
				<th>News</th>
				<!--<th>Status</th>-->
				<th>Action</th>
			</tr>
		</thead>
		<tbody>
			<?php
			$row = 0; 
			foreach($allnewsfeed as $newsfeed){
			?>
			<tr>
				<td>
					<?=$newsfeed['news_name']?>
					<input type="hidden" name="newsfeed[<?=$row?>][news_name]" value="<?=$newsfeed['news_name']?>">
					<input type="hidden" name="newsfeed[<?=$row?>][news_id]" value="<?=$newsfeed['id']?>">
					<input type="hidden" name="newsfeed[<?=$row?>][news_url]" value="<?=$newsfeed['news_url']?>">
				</td>
				<td>
					<?php 
					if (isset($zapnewsfeed[$row]['news_status']) && $zapnewsfeed[$row]['news_status']==1)
					{
						$checked="checked='checked'";
					}
					else
					{
						$checked='';
					}
					?>
					<input name="newsfeed[<?=$row?>][news_status]" class="switch" data-on-label="Show" data-off-label="Hide" type="checkbox" value="1" <?=$checked?>>
				</td>
			</tr>
			<?
			$row++;
			}?>
		</tbody>
	</table>
	<div class="alert alert-zap text-right">
		<button type="submit" class="btn btn-primary btn-xs">Update</button>
	</div>
<?php echo form_close(); ?>
		